Skip to content

Applying Singleton Pattern#437

Closed
Dinosaur09 wants to merge 1 commit intoExpDev07:masterfrom
Dinosaur09:singleton
Closed

Applying Singleton Pattern#437
Dinosaur09 wants to merge 1 commit intoExpDev07:masterfrom
Dinosaur09:singleton

Conversation

@Dinosaur09
Copy link

Course School Project

Singleton ensures that the class has one instance so I applied it in v2.py so it is not overwritten by other code.
The getInstance() will check if any there exists any instances; it will return it if it does, if not, it will instantiate a new instance and then return that instance.

@Kilo59 Kilo59 closed this Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants